﻿
$(document).ready(function () {
    lblKeyid.SetText($.query.get('Keyid'));
    txtRoleCode.SetText($.query.get('RoleCode'));
    txtRoleName.SetText($.query.get('RoleName'));
    txtRoleCode.SetEnabled(false);
    txtRoleName.SetEnabled(false);
});

//分配模块
var doSelectedIndexChanged = function (s,e) {
    alert(arguments.length + ' ' + s.GetValue());
}
//保存
var doSaveModule = function () {
    var keyids = cblModuleList.GetSelectedValues();
    SGDemo.Permission.AssociatedModules.SaveModules(lblKeyid.GetText(), keyids, function (result) {
        if (result.value) {
            $.messager.show({
                title: '信息提示',
                msg: '保存成功'
            });

        } else {
            $.messager.show({
                title: '信息提示',
                msg: '保存失败'
            });
        }
    });
}

var doRefresh = function () {
    this.location.href = this.location.href;
}